package com.ccnu.sb.database;

import com.ccnu.sb.dao.impl.TCustMapper;
import com.ccnu.sb.dao.pojo.TCust;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class RMQL {
    @Autowired
    private TCustMapper custDao;

    public TCust query(String custNo){
        return custDao.selectByPrimaryKey(Integer.valueOf(custNo));
    }

    public boolean insert(TCust cust){
        return custDao.insert(cust)==1;
    }
}
